package view;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import estructuraDeDatos.Reloj;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Menu extends javax.swing.JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Menu instancia; 
	private JMenuBar jMenuBar1;
	private JMenuItem Baja;
	private JMenu Lineas;
	private JMenuItem consultarDeuda;
	private JMenuItem RegistrarConsumo;
	private JButton jButton1;
	private JMenu Salir;
	private JMenuItem BajaPlanAdicional;
	private JMenuItem BajaPlanPrepago;
	private JMenuItem AltaPlanAdicional;
	private JMenuItem AltaPlanPrepago;
	private JMenuItem jMenuItem8;
	private JMenu Plan;
	private JMenuItem AltaPaquete;
	private JMenu Paquete;
	private JMenuItem Datos;
	private JMenuItem Voz;
	private JMenuItem SMS;
	private JMenu Servicios;
	private JMenuItem jMenuItem7;
	private JMenuItem jMenuItem6;
	private JMenu Adicionales;
	private JMenuItem jMenuItem2;
	private JMenuItem jMenuItem1;
	private JMenuItem jMenuItem5;
	private JMenuItem jMenuItem4;
	private JMenuItem jMenuItem3;
	private JMenuItem Alta;
	private JMenu jMenu3;
	private JMenu jMenu2;
	private JMenuBar Modificacion;
	private JMenu jMenu1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				Menu inst = new Menu();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
				//Tarea de calendario, es el primer dia del mes liquidausu
				Reloj c= new Reloj();
				try {
					c.Start();
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		});
	}
	
	public Menu() {
		super();
		initGUI();
		instancia=this; 
		this.setDefaultLookAndFeelDecorated(true);
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			
			this.setTitle("Menu Principal ");
			this.addWindowListener(new WindowAdapter() {
				public void windowClosing(WindowEvent e) 
				  {
				     System.exit(0);
				  }
			});
			
			{
				jMenuBar1 = new JMenuBar();
				setJMenuBar(jMenuBar1);
				{
					jMenu1 = new JMenu();
					jMenuBar1.add(jMenu1);
					jMenu1.setText("Usuarios");
					{
						
						jMenuItem5 = new JMenuItem();
						jMenu1.add(jMenuItem5);
						jMenuItem5.setText("Alta");
						jMenuItem5.setText("Alta");
						jMenuItem5.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaUsuario app = new AltaUsuario();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
						

					}
					{
						jMenuItem1 = new JMenuItem();
						jMenu1.add(jMenuItem1);
						jMenuItem1.setText("Baja");
						jMenuItem1.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								EliminarUsuario app = new EliminarUsuario();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						jMenuItem2 = new JMenuItem();
						jMenu1.add(jMenuItem2);
						jMenuItem2.setText("Modificar");
						jMenuItem2.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								ModificarUsuario app = new ModificarUsuario();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						consultarDeuda = new JMenuItem();
						jMenu1.add(consultarDeuda);
						consultarDeuda.setText("Consultar Deuda");
						consultarDeuda.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								ConsultarDeuda app = new ConsultarDeuda();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
						
					}
				}
				{
					Lineas = new JMenu();
					jMenuBar1.add(Lineas);
					Lineas.setText("Lineas");
					{
						Alta = new JMenuItem();
						Lineas.add(Alta);
						Alta.setText("Alta");
						Alta.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaLineaTitular app = new AltaLineaTitular();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						jMenuItem3 = new JMenuItem();
						Lineas.add(jMenuItem3);
						jMenuItem3.setText("Baja");
						jMenuItem3.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								EliminarLineaTitular app = new EliminarLineaTitular();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						jMenuItem4 = new JMenuItem();
						Lineas.add(jMenuItem4);
						jMenuItem4.setText("Modificar");
						jMenuItem4.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								ModificarLineaTitular app = new ModificarLineaTitular();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						RegistrarConsumo = new JMenuItem();
						Lineas.add(RegistrarConsumo);
						RegistrarConsumo.setText("Registrar Consumo");
						RegistrarConsumo.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								RegistrarConsumoPorLinea app = new RegistrarConsumoPorLinea();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
								
							}
						});
					}
				}
				{
					Servicios = new JMenu();
					jMenuBar1.add(Servicios);
					Servicios.setText("Servicios");
					{
						Datos = new JMenuItem();
						Servicios.add(Datos);
						Datos.setText("Datos");
						Datos.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaServicioDatos app = new AltaServicioDatos();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						SMS = new JMenuItem();
						Servicios.add(SMS);
						SMS.setText("SMS");
						SMS.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaServicioSMS app = new AltaServicioSMS();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						Voz = new JMenuItem();
						Servicios.add(Voz);
						Voz.setText("Voz");
						Voz.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaServicioVoz app = new AltaServicioVoz();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
				}
				{
					Adicionales = new JMenu();
					jMenuBar1.add(Adicionales);
					Adicionales.setText("Adicionales");
					{
						jMenuItem6 = new JMenuItem();
						Adicionales.add(jMenuItem6);
						jMenuItem6.setText("Alta");
						jMenuItem6.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaLineaAdicional app = new AltaLineaAdicional();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						jMenuItem7 = new JMenuItem();
						Adicionales.add(jMenuItem7);
						jMenuItem7.setText("Modificar");
						jMenuItem7.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								ModificarLineaAdicional app = new ModificarLineaAdicional();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
						
					}
				}
				{
					Paquete = new JMenu();
					jMenuBar1.add(Paquete);
					Paquete.setText("Paquetes");
					{
						AltaPaquete = new JMenuItem();
						Paquete.add(AltaPaquete);
						AltaPaquete.setText("Alta");
						AltaPaquete.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaPaquete app = new AltaPaquete();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
				}
				{
					Plan = new JMenu();
					jMenuBar1.add(Plan);
					Plan.setText("Planes");
					{
						jMenuItem8 = new JMenuItem();
						Plan.add(jMenuItem8);
						jMenuItem8.setText("Alta Plan Base");
						jMenuItem8.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								AltaPlanGeneralBase app = new AltaPlanGeneralBase();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						Baja = new JMenuItem();
						Plan.add(Baja);
						Baja.setText("Baja Plan Base");
						Baja.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent arg0) {
								// TODO Auto-generated method stub
								BajaPlanAdicional app = new BajaPlanAdicional();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
							}
						});
					}
					{
						AltaPlanPrepago = new JMenuItem();
						Plan.add(AltaPlanPrepago);
						AltaPlanPrepago.setText("Alta Plan Prepago");
						AltaPlanPrepago.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent e) {
								AltaPlanGeneralPrepago app = new AltaPlanGeneralPrepago();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
								
							}
						});
					}
					{
						BajaPlanPrepago = new JMenuItem();
						Plan.add(BajaPlanPrepago);
						BajaPlanPrepago.setText("Baja Plan Prepago");
						BajaPlanPrepago.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent e) {
								BajaPlanPrepago app = new BajaPlanPrepago();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
								
							}
						});
					}
					{
						AltaPlanAdicional = new JMenuItem();
						Plan.add(AltaPlanAdicional);
						AltaPlanAdicional.setText("Alta Plan Adicional");
						AltaPlanAdicional.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent e) {
								AltaPlanGeneralAdicional app = new AltaPlanGeneralAdicional();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
								
							}
						});
					}
					{
						BajaPlanAdicional = new JMenuItem();
						Plan.add(BajaPlanAdicional);
						BajaPlanAdicional.setText("Baja Plan Adicional");
						BajaPlanAdicional.addActionListener(new ActionListener() {
							
							@Override
							public void actionPerformed(ActionEvent e) {
								BajaPlanAdicional app = new BajaPlanAdicional();
								app.setLocationRelativeTo(null);
								app.setVisible(true);
								instancia.setVisible(false);
								
							}
						});
					}
				}
				{
					Salir = new JMenu();
					jMenuBar1.add(Salir);
					Salir.setText("Salir");
					{
						jButton1 = new JButton();
						Salir.add(jButton1);
						jButton1.setText("Salir");
						jButton1.setBounds(0, 0, 27, 20);
						
					}
					jButton1.addActionListener(new ActionListener() {
						
						@Override
						public void actionPerformed(ActionEvent e) {
							// TODO Auto-generated method stub
							instancia.dispose();
						}
					});

				}
			}
			pack();
			setSize(500, 400);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
